﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Talentnet.Core.Utilities
{
    public static class Common
    {
        public static string GenPwd()
        {
            string p1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
            string p2 = "0123456789";
            string newpass = "";
            Random rnd = new Random();
            int rndVal = 0;
            for (int i = 0; i < 5; i++)
            {
                rndVal = rnd.Next();
                newpass += p1[rndVal % p1.Length];
                rndVal = rnd.Next();
                newpass += p2[rndVal % p2.Length];
            }
            return newpass;
        }
    }
}
